package com.jrx.anytxn.transaction.job.cmpsCrt.step;

import com.jrx.anytxn.transaction.constant.TransBizConstant;
import com.jrx.anytxn.transaction.entity.BtGuaranteeList;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.batch.MyBatisPagingItemReader;

import java.util.HashMap;
import java.util.Map;

public class CrtPaymentPreReader extends MyBatisPagingItemReader<BtGuaranteeList> {

    public CrtPaymentPreReader(SqlSessionFactory sqlSessionFactory, Integer pagesize){
        setSaveState(false);
        setPageSize(pagesize);
        setSqlSessionFactory(sqlSessionFactory);
        setQueryId("com.jrx.anytxn.transaction.mapper.ext.ExtBtGuaranteeListMapper.selectAllByPaymentType");
        Map<String, Object> map = new HashMap<>();
        map.put("paymentType", TransBizConstant.REPAYMENT_TYPE_CRT);
        setParameterValues(map);
    }

}
